<!--
 * @Author: 吴竹叶 2107206923@qq.com
 * @Date: 2023-10-27 16:33:19
 * @LastEditors: 吴竹叶 2107206923@qq.com
 * @LastEditTime: 2023-10-27 16:46:47
 * @FilePath: \BZ_JT_AnQuanHuanBaoGuanLiApp\src\views\staging\environment\index.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div class="energySources-systemManage">
    <customDetailsTopbar title="环境保护业务管理" flag @back="back" />
    <van-grid :column-num="2" :gutter="10" :border="false">
      <van-grid-item v-for="(item,index) in list" :key="index" icon="photo-o" :text="item.text" @click="goList(item)" />
    </van-grid>
  </div>
</template>

<script>
export default {
  data() {
    return {
      list: [
        {
          text: '固废管理',
          icon: '',
          path: '/staging/solidWaste'
        },
        {
          text: '排污许可',
          icon: '',
          path: '/staging/pollutionDischarge'
        }
      ],
      current: ''
    }
  },
  mounted() {
    const { current } = this.$route.query
    this.current = current || ''
  },
  methods: {
    back() {
      this.$router.push({
        path: '/staging/monitor',
        query: { current: this.current }
      })
    },
    goList(item) {
      this.$router.push({
        path: item.path,
        query: { current: this.current }
      })
    }
  }
}
</script>

<style lang="scss">
.van-grid-item__content.van-grid-item__content--center{
  border-radius: 5px;
  .van-grid-item__text{
    color: white;
    font-size: 14px;
  }
  .van-grid-item__icon{
    color: white;
  }
}
.energySources-systemManage .van-grid-item:nth-child(1) .van-grid-item__content.van-grid-item__content--center{
  background-color: #D3A3FF;
}
.energySources-systemManage .van-grid-item:nth-child(2) .van-grid-item__content.van-grid-item__content--center{
  background-color: #F8B65F;
}
.energySources-systemManage .van-grid-item:nth-child(3) .van-grid-item__content.van-grid-item__content--center{
  background-color: #46E9B7;
}
.energySources-systemManage .van-grid-item:nth-child(4) .van-grid-item__content.van-grid-item__content--center{
  background-color: #46B3FB;
}
</style>
